import request from '@/utils/request'

// 查询会员列表
export function listMember(query) {
    return request({
        url: '/repository/member/list',
        method: 'get',
        params: query
    })
}

// 查询会员详细
export function getMember(phone) {
    return request({
        url: '/repository/member/' + phone,
        method: 'get'
    })
}

// 新增会员
export function addMember(data) {
    return request({
        url: '/repository/member',
        method: 'post',
        data: data
    })
}

// 修改会员
export function updateMember(data) {
    return request({
        url: '/repository/member',
        method: 'put',
        data: data
    })
}

// 删除会员
export function delMember(phone) {
    return request({
        url: '/repository/member/' + phone,
        method: 'delete'
    })
}

// 导出会员
export function exportMember(query) {
    return request({
        url: '/repository/member/export',
        method: 'get',
        params: query
    })
}